package com.dalin.platform.log.condition;

import java.util.Date;

import com.dalin.common.pager.Condition;
import com.dalin.common.utils.DateUtils;
/*****************************************************************************
 * @content: 类信息                                                   *
 * @author : 那建林                                                                                                                                 *
 * @crtDate: 2010-06-23                                                     *
 * @modDate: 2010-06-23                                                     *
 * @version: 1.00                                                           *
 ****************************************************************************/
public class LogOperateCondition extends Condition{
    private Long resourceId; // RESOURCE_ID,16,0
    private Long operateUserId; // OPERATE_USER_ID,16,0
    private Integer resourceType; // RESOURCE_TYPE,64,0
    private String resourceName; // RESOURCE_NAME,256,0
    private Date createDate1; // 
    private Date createDate2; // 
    private Integer isSuccessful; // IS_SUCCESSFUL,2,0
    
    
    public LogOperateCondition prepareParams() {
        setBaseQueryStr("select h from LogOperateEntity h, LoaResourceEntity h2 where h.resourceId=h2.resourceId");
        setParam("h2.resourceType", "=", resourceType);
        setParam("h2.resourceName", "=", resourceName);
        setParam("h.operateUserId", "=", operateUserId);
        setBetweenParam("h.createDate", createDate1, DateUtils.getDateAfterDays(createDate2, 1));
        setParam("h.isSuccessful", "=", isSuccessful);
        setOrderBy("h.logOperateId desc");
        return this;
    }

	public Long getResourceId() {
		return resourceId;
	}

	public void setResourceId(Long resourceId) {
		this.resourceId = resourceId;
	}

	public Long getOperateUserId() {
		return operateUserId;
	}

	public void setOperateUserId(Long operateUserId) {
		this.operateUserId = operateUserId;
	}

	public Integer getIsSuccessful() {
		return isSuccessful;
	}

	public void setIsSuccessful(Integer isSuccessful) {
		this.isSuccessful = isSuccessful;
	}

	public Integer getResourceType() {
		return resourceType;
	}

	public void setResourceType(Integer resourceType) {
		this.resourceType = resourceType;
	}

	public String getResourceName() {
		return resourceName;
	}

	public void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}

	public Date getCreateDate1() {
		return createDate1;
	}

	public void setCreateDate1(Date createDate1) {
		this.createDate1 = createDate1;
	}

	public Date getCreateDate2() {
		return createDate2;
	}

	public void setCreateDate2(Date createDate2) {
		this.createDate2 = createDate2;
	}
}
